Repository navigation
script: Wave 6 decompiler lift completeness, typing, delegates, and Roslyn bind improvements - #121
Merged
Merged
Conversation
…oslyn bind improvements - Lift sizing: enforce single-producer invariant on multi-cell variable stores (0/416,093 exceptions across corpus), lifting the final unlifted function 0x9EDAAB12::func_1A65F1 (570,117 / 570,117 lifted, 0 unlifted) - Delegates & conversions: ScriptDelegate in Prelude.cs, Delegate/Combine/Remove typing and invocation, ClassKind::Delegate +/- operators, Handle <-> Cells2 & Entity -> handle conversions, 4-byte struct conversion operators (HashString etc.) - Layouts & multi-cell signatures: stack value-local and value-constructor flows (Dictionary.Enumerator.f_0), multi-cell Returns::Cells sig.result & slot_result, numeric slot-family param unification, delegate field stability - Typing, aggregates & indexers: alloc_managed/this protection against boundary/copy/compare raw poisoning, value_receiver for state-machine MoveNext, wide_kind & Around::arg_reads virtual/offset alignment, value-type builtin instance methods (int.GetHashCode), List/Dictionary primary & multi-cell indexers - Emit, print & reparse: CS0115 emit-time override verification, with_unsafe head re-laying (heads_laid_fitting -> 0), CS0266 object->target casts, CS1615 native-only ref/out + managed/captured addr(ref ...), CS1686 outer-method captured locals, CS1503 int->bool args, foreach (var ...), byte_offset, CS0221 ~0x...UL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wave 6 of the GTA VI script decompiler source-likeness and Roslyn bind improvements:
lift/sizing.rs):0exceptions across all416,093sites in the 745-program corpus), lifting the final unlifted function0x9EDAAB12::func_1A65F1(570,117 / 570,117 lifted,0unlifted).print/prelude,emit,passes/types,print):ScriptDelegate,Handle <-> Cells2, andEntity ->specific handle conversions inPrelude.cs;ClassKind::Delegate+/-operators and 4-byte non-enum valuestructconversion operators (HashStringetc.) inemit(CS195515.6k → 0,CS01496.2k → 0,CS0019 +=/-=6.7k → 183,CS0029 HashString[]15k → 0).project/layouts,project/signatures):Dictionary.Enumerator.f_0), infers multi-cellReturns::Cellssig.result&slot_result, unifies agreed numeric parameters across virtual slot families (CS0115), and preserves delegate field stability.passes/types,passes/aggregates,passes/sugar_runtime,passes/classes/properties.rs):alloc_managedand managedthisfrom boundary/copy/compare raw poisoning, addsvalue_receiverfor state-machineMoveNext, usessig.result/slot_resultinwide_kind&Around::arg_reads, rewrites value-type builtin instance methods (int.GetHashCode(&p1)→p1.GetHashCode()), and recovers primary & multi-cellList/Dictionaryindexers (CS0021-92%).emit,print,reparse,passes/async_await/calls/twin):CS0115override verification (-79%),with_unsafehead re-laying (heads_laid_fitting10 → 0),CS0266object→ target casts, native-onlyref/out(CS161587k → 0) with managed/capturedaddr(ref ...), outer-method captured locals (CS1686),int→boolscript args,foreach (var ...)(CS0030),byte_offset(CS0193), andCS0221~0x...UL.Verification (Full 745-Program Corpus + Roslyn Bind)
All 6 corpus checks passed (
index,oracle0 diffs,reread19,601,export745/745 0 failed,compiled0 diffs,reread-project19,612):#119)->f_Narrowsvoid*declarationsheads_laid_fittingMerge gates passed:
or-iolib tests (1,685/1,685),or-clilib tests (153/153),clippy -p or-io -p or-cli --all-targets -- -D warnings,cargo test --bin openrage doc_(33/33),just self-check(140/140), pre-commit hook (fmt, encoding, provenance).